﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="AdminCmsArticleMediaControl.ascx.cs"
    Inherits="BIS.Portal.Modules.CMS.Adm.AdminCmsArticleMediaControl" %>
<style type="text/css">
    .scroll
    {
        overflow: Scroll;
        height:150px;
        width:200px;
        border:2px solid #c6c6c6;
    }
</style>
<script type="text/javascript">

    $(document).ready(function() {

        $("#btnChooseThumbImage").click(function() {
            var url = '<%=FTPFileManagmentURL %>';
            if (url != '')
                var wins = window.open("<%=FTPFileManagmentURL %>?res=<%=txtUrlAnhDaiDien.ClientID %>", "FTP Management", "scrollbars=1,  width=1000,height=560");
            else
                alert("Chưa thiết lập trang quản lý tập tin !");
        });
    });
</script>
<table width="100%">
    <tr>
        <td valign="top">
            Nhóm nội dung chính
        </td>
        <td>
            <div class="scroll">
                <asp:RadioButtonList ID="rbtlPageAliasAddArticle" runat="server" RepeatLayout="Flow">
                </asp:RadioButtonList>
            </div>
        </td>
        <td valign="top">
            Nhóm nội dung khác
        </td>
        <td>
            <div class="scroll">
                <asp:CheckBoxList ID="chklPageAliasAddArticle" runat="server" RepeatLayout="Flow">
                </asp:CheckBoxList>
            </div>
        </td>
    </tr>
    <tr>
        <td>
           <b> PageAlias</b>
        </td>
        <td>
            <asp:DropDownList ID="ddlPageAliasAddArticle" runat="server">
            </asp:DropDownList>
        </td>
        <td>
            <b>Ngày đăng</b>
        </td>
        <td>
            <asp:TextBox ID="txtNgayDangAddArticle" runat="server"></asp:TextBox>
        </td>
    </tr>
    <tr>
        <td>
            <b>Tiêu đề</b>
        </td>
        <td>
            <asp:TextBox ID="txtTieuDeAddArticle" runat="server" Width="250px"></asp:TextBox>
        </td>
        <td>
        </td>
        <td>
            <asp:CheckBox ID="chkTinNoiBatAddArticle" runat="server" 
                Text="Là tin nổi bật?" />
        </td>
    </tr>
    <tr>
        <td>
            Từ khóa
        </td>
        <td>
            <asp:TextBox ID="txtxTuKhoaAddArticle" runat="server" Width="250px"></asp:TextBox>
        </td>
        <td>
           <b> Ngôn ngữ</b>
        </td>
        <td>
            <asp:DropDownList ID="ddlNgonNguAddArticle" runat="server">
            </asp:DropDownList>
        </td>
    </tr>
    <tr>
        <td>
           Ảnh đại diện
        </td>
        <td>
            <asp:TextBox ID="txtUrlAnhDaiDien" runat="server" Width="180px"></asp:TextBox>
            <input type="button" id="btnChooseThumbImage" value="Browser" causesvalidation="False" />
        </td>
        <td>
           <b> Trạng thái</b>
        </td>
        <td>
            <asp:DropDownList ID="ddlTrangThaiAddArticle" runat="server">
                <asp:ListItem Selected="True" Value="1">Hiển Thị</asp:ListItem>
                <asp:ListItem Value="0">Tạm Ẩn</asp:ListItem>
                <asp:ListItem Value="99">Xóa Logic</asp:ListItem>
            </asp:DropDownList>
        </td>
    </tr>
    <tr>
        <td valign="top">
            Mô tả
        </td>
        <td colspan="3" valign="top">
            <asp:TextBox ID="txtMoTaAddArticle" runat="server" TextMode="MultiLine" 
                Width="500px" Height="150px"></asp:TextBox>
        </td>
    </tr>
    <tr>
        <td>
        </td>
        <td>
            <asp:Button ID="btnCapNhatAddArticle" runat="server" Text="Cập Nhật" />
            <asp:Button ID="btnThemMoiAddArticle" runat="server" Text="Thêm Mới" 
                onclick="btnThemMoiAddArticle_Click" />
            <asp:Button ID="btnBoQuaAddArticle" runat="server" Text="Bỏ Qua" />
        </td>
    </tr>
</table>
<asp:Panel ID="pnlButtonThemMoi" runat="server">
    <table width="100%">
        <tr>
            <td>
                <b>Danh sách media</b>
            </td>
            <td align="right" class="style1">
                <asp:LinkButton ID="lbtnThemMoiMedia" runat="server" 
                    onclick="lbtnThemMoiMedia_Click">Thêm mới media</asp:LinkButton>
            </td>
        </tr>
    </table>
</asp:Panel>
<asp:Panel ID="pnlAddMedia" runat="server">
    <table style="margin-bottom: 0px;" width="100%">
        <tr>
            <td>
                Tiêu đề
            </td>
            <td>
                <asp:TextBox ID="txtTieuDeAddNewDetail" runat="server"></asp:TextBox>
            </td>
            <td>
                Load media
            </td>
            <td>
                <asp:DropDownList ID="ddlLoadMediaAddNewMedia" runat="server">
                </asp:DropDownList>
            </td>
        </tr>
        <tr>
            <td>
                Liên kết
            </td>
            <td>
                <asp:TextBox ID="txtLienKetAddNewDetail" runat="server"></asp:TextBox>
            </td>
            <td>
                Ngôn ngữ
            </td>
            <td>
                <asp:DropDownList ID="ddlNgonNguAddNewMedia" runat="server">
                </asp:DropDownList>
            </td>
        </tr>
        <tr>
            <td>
                Ảnh minh họa
            </td>
            <td>
                <asp:FileUpload ID="fileAnhMinhHoaAddNewDetail" runat="server" />
            </td>
            <td>
                Trạng Thái
            </td>
            <td>
                <asp:DropDownList ID="ddlTrangThaiAddNewDetail" runat="server">
                </asp:DropDownList>
            </td>
        </tr>
        <tr>
            <td>
                Ảnh chi tiết
            </td>
            <td colspan="3">
                <asp:FileUpload ID="fileAnhChiTietAddNewDetail" runat="server" />
            </td>
        </tr>
        <tr>
            <td>
                Mô tả
            </td>
            <td colspan="3">
                <asp:TextBox ID="txtMoTaAddNewDetail" runat="server" TextMode="MultiLine" Width="405px"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td>
            </td>
            <td colspan="3">
                <asp:Button ID="btnCapNhatAddNewDetail" runat="server" Text="Cập nhật" />
                <asp:Button ID="btnThemMoiAddNewDetail" runat="server" Text="Thêm mới" />
                <asp:Button ID="btnBoQuaAddNewDetail" runat="server" Text="Bỏ qua" />
            </td>
        </tr>
    </table>
</asp:Panel>
<asp:Panel ID="pnlListMedia" runat="server">
    <table width="100%">
        <tr>
            <td>
                <asp:Button ID="btnXoaListMedia" runat="server" Text="Xóa media đang được chọn" />
            </td>
            <td align="right">
                <asp:Button ID="btnCapNhatListMedia" runat="server" Text="Cập nhật các media đang hiển thị" />
            </td>
        </tr>
        <tr>
            <td colspan="2">
                <asp:GridView ID="grvListMedia" runat="server" BackColor="White" BorderColor="#CCCCCC"
                    BorderStyle="None" BorderWidth="1px" CellPadding="3" ForeColor="Black" GridLines="Horizontal"
                    AllowPaging="True" AutoGenerateColumns="False" Width="100%">
                    <Columns>
                        <asp:TemplateField>
                            <EditItemTemplate>
                                <asp:CheckBox ID="CheckBox1" runat="server" />
                            </EditItemTemplate>
                            <ItemTemplate>
                                <asp:CheckBox ID="CheckBox2" runat="server" />
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:ImageField HeaderText="Tiêu đề">
                        </asp:ImageField>
                        <asp:BoundField HeaderText="Liên kết" />
                        <asp:BoundField HeaderText="Mô tả" />
                        <asp:BoundField HeaderText="Loại media" />
                        <asp:BoundField HeaderText="Ngôn ngữ" />
                        <asp:TemplateField HeaderText="Thứ tự hiển thị">
                            <ItemTemplate>
                                <asp:TextBox ID="txtThuTuHienThi" runat="server" Width="70px"></asp:TextBox>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Trạng thái">
                            <ItemTemplate>
                                <asp:DropDownList ID="ddlTrangThai" runat="server">
                                    <asp:ListItem Value="1">Cho Phép Hiển Thị</asp:ListItem>
                                    <asp:ListItem Value="0">Tạm Ẩn</asp:ListItem>
                                    <asp:ListItem Value="99">Xóa Logic</asp:ListItem>
                                </asp:DropDownList>
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                    <FooterStyle BackColor="#CCCC99" ForeColor="Black" />
                    <PagerStyle BackColor="White" ForeColor="Black" HorizontalAlign="Right" />
                    <SelectedRowStyle BackColor="#CC3333" Font-Bold="True" ForeColor="White" />
                    <HeaderStyle BackColor="#333333" Font-Bold="True" ForeColor="White" />
                </asp:GridView>
            </td>
        </tr>
    </table>
</asp:Panel>
